<template>
     <div class="usercenter">
        <div class="headp"><img src="../assets/images/users.png" alt=""></div>
        <div><span @click="$router.push('/land')">登陆</span>/<span @click="$router.push('/register')">注册</span></div>
     </div>
</template> 
<script>
export default {
    name: 'UserCenter',
    beforeRouteEnter(to,from,next){
        if(!localStorage.getItem('xiaomiid')){
            next("/land")
        }
        next()
    }
}
</script>
<style scoped>
    .usercenter {
        display: flex;
        height: 3.34rem;
        background: url(../assets/images/userback.png) center 0 #f37d0f;
        background-size: auto 100%;
        padding: .664rem 0;
    }
    .usercenter .headp img {
        width: 2rem;
        height: 2rem;
    }
    .usercenter div {
        color: #fff;
        font-size: .5rem;
        margin-left: .4rem;
        line-height: 2rem;
    }
</style>